#ifndef PLAYER_SMART_MEDIA_PLAYER_H
#define PLAYER_SMART_MEDIA_PLAYER_H

#include "common.h"
#include "MsgQueue.h"

//using namespace std;

class SmartMediaPlayer
{
public:
	SmartMediaPlayer();
	~SmartMediaPlayer();
	//void setDriver(SmartMediaPlayerDriver* driver);
	void serDataSourceAsync(const char* url);
	void serDataSourceAsync();
	void prepareAsync();
	void start();
	void pause();
	void resetAsync();
	void seekToAsync(int seektime, bool needNotify = false);
	status_t getCurrentPositon(off64_t* mediaUs);
private:
	void onStart(off64_t startPositon);
	void onPause();
	void onResume();

	void*	MessageReceive();
	static void* ThreadFunc(void* data);

	pthread_t 	mThread;
	MsgQueue*	mQueue;
	//SmartMediaPlayerDriver*	mDriver;
};
#endif